In [ ]:
for radek in range(4):
radek += 1
for value in range(radek):
print('X', end=' ')
print('')
In [ ]:
for radek in range(1, 5):
print('X ' * radek)
In [ ]:
promenna = "X"
for j in range(5):
for i in promenna:
print(i, i, i, i, i)
In [ ]:
for j in range(5):
print('X ' * 5)
In [ ]:
prve = input('Zadej cislo: ')
druhe = input('Zadej cislo: ')
tretie = input('Zadej cislo: ')
stvrte = input('Zadej cislo: ')
piate = input('Zadej cislo: ')
if prve<druhe and prve<tretie and prve<stvrte and prve<piate:
print(prve)
if druhe<prve and druhe<tretie and druhe<stvrte and druhe<piate:
print(druhe)
if tretie<prve and tretie<druhe and tretie<stvrte and tretie<piate:
print(tretie)
if stvrte<prve and stvrte<druhe and stvrte<tretie and stvrte<piate:
print(stvrte)
if piate<prve and piate<druhe and piate<tretie and piate<stvrte:
print(piate)
In [ ]:
a = float(input('Prvni cislo: '))
b = float(input('Druhe cislo: '))
c = float(input('Treti cislo: '))
d = float(input('Ctrvte cislo: '))
e = float(input('Pate cislo: '))
m = a
for cislo in a, b, c, d, e:
if cislo < m:
m=cislo
print(m)
In [ ]:
minimum = 0
for x in range(5):
cislo = int(input('Zadej cislo: '))
if minimum == 0 or cislo < minimum:
minimum = cislo
print('Nejmensi zadane cislo je', minimum)
In [ ]:
from turtle import forward, shape, left, right, exitonclick, penup, pendown, back
# pětiúhelník:
vnitrniuhel = 180*(1-(2/5))
vnejsiuhel= 180-vnitrniuhel
for x in range (5):
forward(200/5)
left(vnejsiuhel)
penup()
forward(100)
pendown()
# šestiúhelník:
vnitrniuhel = 180*(1-(2/6))
vnejsiuhel= 180-vnitrniuhel
for x in range (6):
forward(200/6)
left(vnejsiuhel)
penup()
forward(100)
pendown()
# sedmiúhelník:
vnitrniuhel = 180*(1-(2/7))
vnejsiuhel= 180-vnitrniuhel
for x in range (7):
forward(200/7)
left(vnejsiuhel)
penup()
forward(100)
pendown()
# osmiúhelník:
vnitrniuhel = 180*(1-(2/8))
vnejsiuhel= 180-vnitrniuhel
for x in range (8):
forward(200/8)
left(vnejsiuhel)
exitonclick()
In [ ]:
from turtle import forward, shape, left, right, exitonclick, penup, pendown, back
for n in range(5,9):
vnitrniuhel = 180*(1-(2/n))
vnejsiuhel= 180-vnitrniuhel
for x in range (n):
forward(200/n)
left(vnejsiuhel)
penup()
forward(100)
pendown()
exitonclick()
In [1]:
# ##### ## #######
# ############################
# #############################
# #################################
# | |___________
# | ( ) ( ) ( ) |________ /
# | ) ( ) ( ) ( | / /
# | ( ) ( ) ( ) | / /
# | ) ( ) ( ) ( | / /
# | ( ) ( ) ( ) |____/ /
# | ) ( ) ( ) ( |_____/
# | (___) (___) (___) |
# | |
# |_____________________________|